package com.zc.im.seqsvr.domain;

import com.zc.im.common.r2dbc.domain.AbstractBase;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.data.relational.core.mapping.Table;

/**
 * Project：im
 * Date：2022/4/13
 * Time：18:20
 * Description：seq记录
 *
 * @author Challen.Zhang
 * @version 1.0
 */
@Getter
@Setter
@Table("im_max_seq")
@NoArgsConstructor
public class MaxSeq extends AbstractBase {

    private Long maxSeq;

    public MaxSeq(Builder builder) {
        super(builder);
        this.maxSeq = builder.maxSeq;
    }

    public static class Builder extends AbstractBase.Builder<Builder> {


        private Long maxSeq;

        public Builder maxSeq(Long maxSeq) {
            this.maxSeq = maxSeq;
            return this;
        }


        @Override
        protected Builder self() {
            return this;
        }

        @Override
        public MaxSeq build() {
            return new MaxSeq(this);
        }
    }
}
